package com.forekenow.Demo10;

/**
 * 字符串String以及常用方法
 */
public class StringDemo {
    public static void main(String[] args) {
        String  s ="tom";
        String snew = s.concat("hello");
        System.out.println(snew);
        String s_new = s+"hello";
        System.out.println(s);
        System.out.println(s_new);

        System.out.println( "hamburger".substring(4, 8) +"smiles".substring(1, 5));

        String reg = "aa  bb cc dd ee";
        String[] result = reg.split("");
        for (int i = 0; i < result.length; i++) {
            System.out.print(result[i]+"\t");
        }



    }
}
